package ast;

import java.util.ArrayList;

import compiler.OutputFormatter;

public class ExpressionList {
	private ArrayList<Expression> list;
	
	public ExpressionList(ArrayList<Expression> list) {
		this.list = list;
	}

	/**
	 * Generates the C source code of the current knot
	 * @param of The OutputFormatter where the code will be generated
	 */	
	public void genC(OutputFormatter of) {
		for(int i = 0; i < list.size(); i++) {
			Expression e = list.get(i);
			e.genC(of);
			if(i != list.size() - 1)
				of.output(", ");			
		}
	}

}
